<template>
  <a-sub-menu v-bind="$props" v-on="$listeners">
    <template slot="title">
      <a-icon type="mail" /><span>{{ menu.title }}</span>
    </template>
    <template v-for="(item) in menu.children">
      <SubMenuBar v-if="item.children&&item.children.length>0" :key="item.key" :menu="item" />
      <a-menu-item v-else :key="item.key">{{item.title}}</a-menu-item>
    </template>
  </a-sub-menu>
</template>

<script>
import { Menu } from 'ant-design-vue';
export default {
  name:"SubMenuBar",
  isSubMenu: true,
  props:{
    ...Menu.SubMenu.props,
    menu:Object
  },
  data(){
    return {
      isSubMenu: true
    }
  }
}
</script>

<style lang="scss" scoped>

</style>